<?php
/**
 * Author: bedirhan
 */

    include "MSALParser.php";
    include "MSALDB.php";
    
    /* Open a test modsec single audit log file for testing */
    $arrayOfLines = file("AuditLogInstance.txt");
    try{
        $msal = MSALParser::parse($arrayOfLines, 0, count($arrayOfLines) - 1);

        echo $msal->toStringHTML();

        //MSALDB::saveMSAL($msal);
    }
    catch(MSALParserException $msalpe){
        echo "Error: " . $msalpe->getMessage();
    }
    catch(MSALDBException $msaldbe){
        echo "Error: " . $msaldbe->getMessage();
    }    
?>
